package com.utils;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author:周鹏
 * @date: 2020/10/23 10:09
 * @description:文件上传工具类
 */
@Configuration
public class uploadMapping implements WebMvcConfigurer {
    @Override
    //设置请求路径和磁盘路径映射
    public void addResourceHandlers(ResourceHandlerRegistry registry){
        registry.addResourceHandler("/upfile/**").addResourceLocations("file:D:/upload_image/");



    }



}
